Test Series - java script

Test Number 1/92

Q: The web development environment (JavaScript) offers which standard construct for data validation of the input entered by the user.
A. Controlled loop constructs
B. Server page access
C. Client side Event
D. Permit server-side
Solution: JavaScript provides with for, while loops and if, else, switch cases for checking the information entered by the user. Additionally, all development environments provide syntax to create and use memory variables, constants, and functions.
Q: The main purpose of a “Live Wire” in NetScape is to ________
A. Create linkage between client side and server side
B. Permit server side, JavaScript code, to connect to RDBMS
C. Support only non relational database
D. To interpret JavaScript code
Solution: A Live Wire database driver also supports a number of non-relational databases.
Q: The script tag must be placed in __________
A. the head tag
B. the head or body
C. the title or head
D. after the body tag
Solution: If the script tag is placed after the body tag, then, it will not be evaluated at all. Also, it is always recommended and effective to use the script snippet in the  tag.
Q: A JavaScript program developed on a Unix Machine ________
A. will throw errors and exceptions
B. must be restricted to a Unix Machine only
C. will work perfectly well on a Windows Machine
D. will be displayed as a JavaScript text on the browser
Solution: JavaScript can be executed on different operating systems therefore the program developed on UNIX will work perfectly fine on windows also.
Q: JavaScript is ideal to ________
A. make computations in HTML simpler
B. minimize storage requirements on the web server
C. increase the download time for the client
D. increase the loading time of the website
Solution: JavaScript helps in performing various tasks with minimum storage requirements. Therefore to minimize storage requirements, JavaScript is always a better say.
Q: Which attribute is used to specify that the script is executed when the page has finished parsing? (only for external scripts)
A. parse
B. a sync
C. defer
D. type
Solution: The defer attribute is a Boolean attribute. When present, it specifies that the script is executed when the page has finished parsing.
Q: JavaScript Code can be called by using ____________
A. RMI
B. Triggering Event
C. Preprocessor
D. Function/Method
Solution: JavaScript code can be called by making a function call to the element on which JavaScript has to be run. There are many other methods like onclick, onload, and onsubmit etc.
Q:  JavaScript can be written __________
A. directly into JS file and included into HTML
B. directly on the server page
C. directly into HTML pages
D. directly into the css file
Solution: JavaScript files can be saved by .JS extension and can be included in the HTML files. Script tag along with src attribute is used to include the js files.
Q: Which of the following Attribute is used to include External JS code inside your HTML Document?
A. src
B. ext
C. script
D. link
Solution: Script “tag” is used to include the JavaScript code. To include external JavaScript files “src” attribute is used inside the script tag.
Q: A proper scripting language is a __________
A. High level programming language
B. Assembly level programming language
C. Machine level programming language
D. Low level programming language
Solution: JavaScript is a high-level programming language that is interpreted by another program at runtime rather than compiled by the computer’s processor. Scripting languages, which can be embedded within HTML, commonly are used to add functionality to a Web page, such as different menu styles or graphics displays or to serve dynamic advertisements.

You Have Score    /10